package com.h2cloud.ResolvalbeType;

import org.junit.Assert;
import org.springframework.core.ResolvableType;

/**
 * @Package: com.h2cloud.ResolvalbeType
 * @ClassName: forClassTest
 * @Author: h2cloud
 * @CreateTime: 2023/11/7 11:11 下午
 * @Description:
 */
public class forClassTest {
	public static void main(String[] args) {
		ResolvableType resolvableType = ResolvableType.forClass(ServiceImpl.class);
		// getType 保存原始的 Type 类型
		Assert.assertEquals(ServiceImpl.class, resolvableType.getType());
		// resolve 将 Type 解析为 Class， 如果无法解析返回 null
		Assert.assertEquals(ServiceImpl.class, resolvableType.resolve());
	}
}
